#include <bits/stdc++.h>
using namespace std;
int n,a[100001],b=1,g=2,sum;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    sort(a+1,a+n+1);
    while(g<=n)
    {
        if(a[g]<=a[b])
        {
            g++;
            continue;
        }
        else
        {
            a[b]=0;
            g++;
        }
        while(a[b]==0)
            b++;
    }
    for(int i=1;i<=n;i++)
        if(a[i]!=0)
            sum++;
    cout<<sum<<endl;
    return 0;
}
